﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TracNghiemTinHocDaiCuong.BIZ;
using TracNghiemTinHocDaiCuong.ThucThe;
using TracNghiemTinHocDaiCuong.Common;

namespace TracNghiemTinHocDaiCuong
{
    public partial class DanhSachDe : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            repDanhSachDeTinHocCanBan.DataSource = DeThiBIZ.LayDanhSach("Tin học căn bản");
            repDanhSachDeTinHocCanBan.DataBind();
            repDanhSachDeLapTrinh.DataSource = DeThiBIZ.LayDanhSach("Lập trình");
            repDanhSachDeLapTrinh.DataBind();
            repDanhSachDeGiaiQuyetBaiToan.DataSource = DeThiBIZ.LayDanhSach("Giải quyết bài toán");
            repDanhSachDeGiaiQuyetBaiToan.DataBind();
            repDanhSachDeTongHop.DataSource = DeThiBIZ.LayDanhSach("Tổng hợp");
            repDanhSachDeTongHop.DataBind();
        }

        protected void lkbtnNoiDungDe_Click(object sender, CommandEventArgs e)
        {
            Session["maDe"] = e.CommandName;
            DeThi deThi = DeThiBIZ.TimTheoId(Methods.ConvertNumber(Session["maDe"].ToString()));
            Response.Redirect(string.Format("TestThu.aspx?ID={0}", Session["maDe"]));
        }
    }
}